namespace DeviceRepairWorkflow.Api.Models;

public class RepairRequest
{
    public int Id { get; set; }
    public int DeviceId { get; set; }
    public Device? Device { get; set; }
    public string Title { get; set; } = string.Empty;
    public string Description { get; set; } = string.Empty;
    public RepairPriority Priority { get; set; } = RepairPriority.Low;
    public RepairStatus Status { get; set; } = RepairStatus.Pending;
    public string RequestedBy { get; set; } = string.Empty;
    public string? AssignedTo { get; set; }
    public DateTime CreatedAt { get; set; } = DateTime.Now;
    public DateTime? StartedAt { get; set; }
    public DateTime? CompletedAt { get; set; }
    public string? WorkflowInstanceId { get; set; }
    public string? Notes { get; set; }
    public decimal? EstimatedCost { get; set; }
    public decimal? ActualCost { get; set; }
    
    // New workflow-related properties
    public int? RequestedByUserId { get; set; }
    public User? RequestedByUser { get; set; }
    public int? AssignedToUserId { get; set; }
    public User? AssignedToUser { get; set; }
    public WorkflowInstance? WorkflowInstance { get; set; }
}

public enum RepairPriority
{
    Low = 1,
    Medium = 2,
    High = 3,
    Critical = 4
}

public enum RepairStatus
{
    Pending,
    DecisionPending,
    ExternalRepair,
    InternalRepair,
    WaitingForApproval,
    Approved,
    InProgress,
    WaitingForParts,
    Testing,
    Completed,
    Rejected,
    Cancelled
} 